═══ 1. Introduction ═══ pmCalc o does not try to simulate a real calculator: For example, it does not have an "=" button. The notation of the formulas is like in a programming language. Nevertheless, there is a calculator-like mouse interface. o is Shareware. Without a registration key, you will get sometimes an info screen at the beginning - there's no other limitation. o is a true 32 bit program, available for Win95/NT and OS/2. o recalculates the result after every keystroke. You have an entry field and a separate result field. If a formula is incomplete or erroneous, pmCalc will display a detailed error message instead of the result. You can choose between different output formats. o supports easy transfer of input and output through the clipboard. o enables calulating with variables: X in the main entryfield will be replaced by the contents of the X entryfield. o recalculates variables like X if the result is given: for this regression in one dimension, press the reg button o supports scientific functions (press the fct button for an extended keyblock). o offers programmers functionality: hexadecimal, octal, binary and Ascii input, overflow simulation of integer variables (press the prg button). o remembers the last 20 inputs (last20 list) and saves formulas permanently. o supports hypertext online help. Press the help button and after that the button you want to have explained. You can simply press F1, too. Press help two times to get the help contents. o calculates with double precision floating point values, so you have 15 correct digits. o has got a Pentium bug correction; the overflow simulation works correctly even with a defective Pentium II. ═══ 2. Installation ═══ Simply copy pmCalc.exe and pmCalc_E.hlp to your harddisk into a directory of your choice. pmCalc_G.hlp is the german hypertext helpfile. You can make a program object on your desktop using the program template in your template folder. Last20.txt is a "last20 list" (history file) with sample formulas. If you don't copy the file last20.txt, pmCalc creates a new file last20.txt. Please note that pmCalc has got a system menu (single clicking the left close button). If you want to have pmCalc with colors, also copy colorsmp and type into the program object settings notebook parameter field: color:COLORSMP pmCalc can be started with a lot of program parameters, so you can create several program icons with different arguments. A nice idea to start pmCalc without the launchpad * ═══ 3. Important items ═══ See all clear, clipboard, input, last20 list, output format. You see, pmCalc can have colors. ═══ 4. Notation of the formulas ═══ subchapters: keyboard and mousebuttons Ignored characters Order of operators Notation of floating point numbers upper and lower case letters next chapter: Output format ═══ 4.1. keyboard and mousebuttons ═══ You can use the mouse buttons or the keyboard by typing directly into the main entryfield or in the V, W, X and Y variable entryfields. To learn the notation of pmCalc formulas, use the mouse buttons. (See important items) pmCalc offers a useful feature for generating brackets when using the mouse for input. If your input is 1+2 and you want to multiply the result by 3, simply enter * * 3 . pmCalc automatically changes the input into (1+2)*3 . This feature works with * , / , pwr and the programmers operators. ═══ 4.2. Ignored characters ═══ You can always use spaces in your formulas; they will be ignored, even within a number. You can write comments in brackets [ ], also several times. You can use the keyboard or the com (comment) button. In hexadecimal numbers, you are allowed to use ":", which will be ignored. So a hex-number can be #h12dc:0bf7 . ═══ 4.3. Order of operators ═══ The order of calculating the operators without brackets is the following: o ' ( min ) min'sec (see minutes) o ^ ( pwr ) to the Power of o programmers operators o / divide, * multiply o - minus, + plus You can change the order by using parenthesis ( ). There is no limit of levels. ═══ 4.4. Notation of floating point numbers ═══ Floating point numbers can be written with dot or comma, like 12.34 or 12,34 . You can use thousand-commas (American) or thousand-dots (German) like 10,000.00 or 10.000,00 . pmCalc interprets commas and dots as equivalent. The last dot/comma will be interpreted, other dots/commas aren't interpreted. For example: 1,23.4.5.6.78 is the same as 123456.78 . ═══ 4.5. upper and lower case letters ═══ Note that pmCalc is case-sensitive. The name of the constant 3.1415... is Pi, not pi, the name of the constant 2.7182... is Eul not eul (Euler constant). Also you aren't allowed to write functions like sin() with capital letters. If you aren't sure, use the mouse buttons to learn the notation. Hex numbers aren't case sensitive. ═══ 5. Output format ═══ subchapters: General precision fraction min sec next chapter: special features ═══ 5.1. General ═══ You can choose how the result will be shown (output format). Enter a big number and try the options in the drop down field. ═══ 5.2. precision ═══ With precision, you can enter the number of digits behind the dot. Note that "precision 0" changes the result 2.4 to 2. If you press X< to copy the result into the X field, "2" with the value 2.000 is copied and not 2.4. ═══ 5.3. fraction ═══ With the output format "fraction", pmCalc converts a floating point number into a fraction. For example type 2.35888888 and you will get 2123/900. Sometimes, this can take half a second because pmCalc has to employ a "trial and error" strategy. Now enter a random digit like 2.36428754732 and change the precision. A higher precision will force a small delay and very high precision will generate an error "correct fraction not found". ═══ 5.4. min sec ═══ /60 hour min sec divides the result by 60. For example 121 will be shown as 2 h 1 min . Choosing result min'sec together with the "min" button, you can simply calculate time: 18'21 - 14'43 = 3'38 . ═══ 6. special features ═══ special features subchapters: Minutes Percent button Pentium bug Changing colors special buttons next chapter: V, W, X and Y entryfields ═══ 6.1. Minutes ═══ You can enter hours, minutes and seconds: 2'30"45. ' and " are interpreted similarly, so 2'30'45 is also allowed. It's calculated as: h + min/60 + sec/3600 ═══ 6.2. Percent button ═══ The percent button always relates to the last operator: 1000+25% = 1250 1000-25% = 750 1000*25% = 250 1000/25% = 4000 You can use parenthesis ( ) with the percent button, also variables like X are allowed. 1000+(12+13)% 1000+X% ═══ 6.3. Pentium bug ═══ pmCalc has an automatic Pentium bug correction. When you have a defective Pentium and enter a division where defective Pentiums don't find the correct result, you will get the correct result and hear a beep. For example 5505001/294911 , the correct result is 18,66665197 ; the wrong result would be 18,66600093 . Also the Pentium II processor has got a bug: Sometimes the processor doesn't give a correct overflow warning if a big number doesn't fit a smaller variable (see programmers functions). Because pmCalc has got a different strategy (pmCalc compares the content of the smaller variable with the old double value), overflow simulation works correctly even with a defective Pentium II. ═══ 6.4. Changing colors ═══ If you have nothing to do (e. g. making boring phone calls), you can drag and drop OS/2 system colors to the pmCalc buttons and entryfields, see color sample. To change the color of the font instead of the button, press Ctrl while dropping. To store the colors in a file, you have to enter a program parameter in the pmCalc program object settings notebook parameter field: color:filename As default, the file has to be placed in the directory where PMCALC.EXE is located. The file format is binary, so you can't edit the file. The file COLORSMP is a sample color file. If you have spent a lot of time changing colors, make a copy of your color file. Sometimes pmCalc corrupts the color file. * If you think your colors are very nice, you can send the file to me by email. ═══ 6.5. special buttons ═══ AC all clear. Clears the main, X and Y entryfields, saves the old input in the last20 list EXP exponent. 1.0e3 means 1.0 * 10^3 = 1000 pwr means x power of y (x^y) sample: 2^4 = 2*2*2*2 = 16 1/ 1/(x): reciprocal of x undo restores the last input which was not changed for 2.5 seconds. ═══ 7. V, W, X and Y entryfields ═══ In the V, W, X and Y field, you can enter numbers or formulas which can be changed without changing the main entry field. For example, the formula in the main entry field is "(X+Y)/2", and the X field is "5", the Y field is "3+4", pmCalc replaces the X and Y characters in the main entry field with the occurences of the X and Y field in brackets: ((5)+(3+4))/2 The result is 6. Note that there's a regression mode where you can recalculate variables like X when the result is known. ═══ 8. Regression ═══ If you have got a formula with variables X, Y, V, W and the result is given, you can recalculate the value of a variable, e. g. 3*X^2 + 8*X + 3 = 206 What's the value of X ? To get an answer, do the following: o Enter the formula without the equal character in the main entry field and without the number on the right side of the equals sign o you can optionally enter a value of your choice into the X field o press the reg button o enter 206 in the regression entry field o press the X? button. pmCalc has to employ a "trial and error" strategy, but it works very fast, hardly without any delay. With the = button near the regression entry field, the contents of the pmCalc result field is copied into the regression entry field. With the precision spinbutton, you can influence the regression: a precision of 4 will calculate the X value to 4 decimal places. Because of rounding effects, it's possible that the regression doesn't hit the result exactly, e.g. in the pmCalc result field there's 19.9997 even if the regression entry field is 20. It can happen that if the X field is empty, pmCalc does not find any X value or, if there are more than one possible X values, it does not hit the result you are interested in. In these cases, you can enter a start value in the X field which is near the result. For example enter X*X into the main entry field, 400 into the regression entry field and -1 into the X field. Then pmCalc finds the X value -20. (There are two correct values: 20 and -20.) A good start value can reduce regression calculating time. ═══ 9. Clipboard ═══ subchapters: General Using Z and autoclip simultaneously Export and Import of a formula hidden pmCalc next chapter: Saving formulas - the last20 list ═══ 9.1. General ═══ pmCalc can be used with the Clipboard (Clipboard = Z ). You can enter a formula like sin(Z/3) "sine of (Clipboard divided by 3)". The clipboard may contain a number or a formula. When autoclip is on, pmCalc automatically writes the result into the clipboard. ═══ 9.2. Using Z and autoclip simultaneously ═══ Using Z and autoclip simultaneously: Every time you copy a number or a formula to the clipboard (from another application), pmCalc will grab it and substitute it for every Z in its formula. Then the result will be placed into the clipboard automatically. So you can use pmCalc in the background. To test the clipboard function, I recommend using the OS/2 "show clipboard" program. * ═══ 9.3. Export and Import of a formula ═══ If you want to export a formula into another application, you can copy it into the clipboard by pressing the Z< button next to the main entry field. For To re-use the formula, you copy it back to the clipboard and then press the Z> button in pmCalc. pmCalc can save a formula itself. Note that you are allowed to write comments in brackets [ ]. You can put several lines from an editor into the clipboard. Pushing the Z> button or using the Z variable, pmCalc will change every "Return" into a "+". Remember that spaces will be ignored. With the button = > Z , you can write the input and the result in the clipboard simultaneously, for example 1+1 = 2.0000 ═══ 9.4. hidden pmCalc ═══ If your input is a simple "Z" in the main entry field and autoclip is on, you can use pmCalc completely in the background. Copying a formula from your editor into the clipboard will automatically return the result into the clipboard. It can be useful to put the pmCalc-window at the bottom of your desktop, so only the result field and the Z-field is shown and everything below the result field is outside the desktop. ═══ 10. Saving formulas - the last20 list ═══ subchapters: The Last20 List Saving formulas Loading formulas Default formula next chapter: Programmers functionality ═══ 10.1. The Last20 List ═══ pmCalc remembers the last 20 inputs. Every input immediately before pressing AC will be placed in the last20 list. In other words, the AC button saves the old input and deletes the entry field. With the up and down buttons near the main entry field, you can reuse older inputs. The current input is lost if you don't press AC , e.g. when recalling a last20 list entry. If you exit pmCalc, the last 20 inputs will be saved in the text file LAST20.TXT. You can edit this file with an text editor. You can use your own formula files: A program parameter containing ".TXT" or ".PMC" is a filename which is used instead of "LAST20.TXT". So you can drop your special formulas to the pmCalc program object. Making an association "*.PMC" enables you to start the formula file directly with double-click. ═══ 10.2. Saving formulas ═══ If the input begins with a comment, e.g. [simple] X + Y*2 and you press AC , the formula will be placed in the last20 list permanently. That means, in the file LAST20.TXT you can have a lot of formulas beginning with "[" and 20 normal inputs not beginning with "[". When changing a formula which is already part of the last20 list (that means, it begins with the same comment) the old entry in the last20 list is replaced when pressing AC . ═══ 10.3. Loading formulas ═══ If you type only the leading comment of a formula which is already part of the last20 list, the formula will be expanded automatically (!). To try this, simply enter [sq] for the square equation formula which is already part of the last20 list. If there are any characters (e.g. a space) after the comment brackets, the expansion won't work. ═══ 10.4. Default formula ═══ If you enter a formula beginning with [default] (in lower case letters), the formula always appears when starting pmCalc. Note that you can start pmCalc with different last20 lists by using the program parameter filename.txt or filename.pmc. With the file association *.pmc, you can easy start different pmCalc's with different default formulas. ═══ 11. Programmers functionality ═══ Press the prg button for an extended keyblock. subchapters: numeric forms Programmers operators Simulation of integer operations next chapter: Scientific functions ═══ 11.1. numeric forms ═══ For hexadecimal input, you can press the hex button or you can write $ or #h. After that, a 32-bit numeric value (from 0 to to 4294967295) is expected. ":" is ignored. Other numeric forms and ASCII characters are entered with the buttons oct , bin , ASCII or with a hash followed by the characters o for octal, b for binary and a for ASCII. So the decimal number 100 can be written as: 100 $64 #h64 #h0000:0064 #o144 #b0110 0100 #ad Remember that you are always allowed to use spaces. You can also choose these numeric forms in the output format. ═══ 11.2. Programmers operators ═══ The Programmers window offers you new operators. In addition to + , - , / , * , you have got the bitwise operators and indicates by the character & or | xor \ shl < (shift left) shr > (shift right) mod ~ (modulo) not is a function and takes the form not (X) The choice of integer variables (long/short/char) has no influence on other operators and functions besides the operators shown above. Modulo calculates the rest of a division, for example 11 modulo 7 = 4. If the Programmers Window is closed and all calculations are made by Double floating point variables, you can use the modulo operator nevertheless. Modulo is calculated then with floating point variables: So Modulo is not an Integer specific operator. If you want to understand the effect of these operators, use the binary input and output of pmCalc. ═══ 11.3. Simulation of integer operations ═══ pmCalc lets you calculate with specific integer variables. You can choose between 3 * 2 settings: variables of 4, 2 and 1 byte, and signed or unsigned. E.g. with the calculation of not(1) and the unsigned setting you will get three different results, dependent on the variables you choose. You can simulate overflow of integer variables. If an overflow occurs, on the programmers window "overflow!" is displayed and in the pmCalc result field you will see the "wrong" result. Example: Use "unsigned char" and calculate 255+3. Because a char has only 256 different values, you will get an overflow and the result is 2. For Pascal programmers: The expressions long, short, char are the C synonyms for LONGINT, INTEGER, BYTE. "Unsigned short" is a WORD. In Pascal, LONGINT and INTEGER are signed, BYTE is unsigned. ═══ 12. Scientific functions ═══ pmCalc supports scientific functions (press the fct button for an extended keyblock). subchapters: Trigonometric Functions Logarithmic functions other functions next chapter: program parameters ═══ 12.1. Trigonometric Functions ═══ sin(x) sine of x cos(x) cosine of x tan(x) tangent of x asin(x) arcsine: inverse function of sin(x) asin(sin(x)) = x acos(x) arccosine: inverse function of cos(x) atan(x) arctangent: inverse function of tan(x) Pi the constant Pi (3,1415...) With the checkbutton degree you can choose between degree and radian input. If degree is activated, trigonometric functions are running with degrees. For example, sin(90) is 1.0000. If you turn degree off, you can enter radian input. The equivalent input would now be sin(Pi/2). degree and radial values Figure of Sine, Cosine and Tangent Sine and Cosine curve ═══ 12.2. Logarithmic functions ═══ ln(x) natural logarithm of x log(x) logarithm of x, base 10 Eul the euler constant (2.71828...) Eul^x is the inverse function of ln(x). 10^x is the inverse function of log(x). ═══ 12.3. other functions ═══ frac(x) fraction: frac(67.89) = 0.89 int(x) integer part: int (67.89) = 67.00 abs(x) absolute value: abs(12) = 12 abs(-12) = 12 fac(x) x! factorial of x fac(4) = 1*2*3*4 = 24 floating point numbers are converted by int(abs(x)) sqr(x) square of x, equal to x^2 sqrt(x) square root of x, equal to x^(1/2) ═══ 13. program parameters ═══ Program parameters can be entered in the "parameter" field of the pmCalc program object settings notebook. When starting pmCalc from the commandline, you can simply enter parameters (arguments) after "pmCalc". Note that most entries are case-sensitive, the order makes no difference. A number specifies the output precision. A double-quoted string specifies the output format. It has to match exactly one of the strings available in the output format field. input:sin(X)*2 starts pmCalc with the formula "sin(X)*2" in the main entry field. Note that you have to use quotes if you have got spaces in your formula, e.g. "input:sin(X) * 2" . You can also choose a default entry by using the default formula. autoclip makes the autoclip checkbox on when starting pmCalc. radial turns the "degree" checkbox off when starting pmCalc, degree turns it on. iconized starts pmCalc iconized, maximized starts pmCalc maximized. Clicking into the "pmCalc" entry of the tasklist shows pmCalc. Filename.txt or Filename.pmc uses a specific file for the Last20 list instead of the default LAST20.TXT file. color:filename is for loading and saving position and button colors in the file "filename". Examples: "scientific (exp)" 10 2 "thousand-comma" input:Z autoclip iconized starts pmCalc to use in the background. ═══ 14. About pmCalc ═══ subchapters: Shareware registration bugs and improvements Disclaimer Contacting the author Another pmCalc program other programs About this hypertext ═══ 14.1. Shareware registration ═══ This program is Shareware. If you register pmCalc, you will get a registration code you have to enter in the pmCalc main entry field and select "process registration" in the system menu. A new pmCalc.exe file is not necessary. The registration fee is 30 Dollars, (50 Deutsche Mark) . When ordering more than one licenses, you will get a 30% discount for every additional license. You can register this software with Compuserve Software registration. Go SWREG . The Registration ID is 10704 , the registration fee 30$ . If you live in America and don't have a Compuserve account, then please contact BMT micro . See BMTORDER.FRM for details. BMT Micro, Inc. 910-791-7052 Voice / 910-350-2937 Fax finger tbrad@wilmington.net for PGP public key http://www.bmtmicro.com ftp.bmtmicro.com/bmtmicro alternate email: bmt01@ibm.net If you don't have a Compuserve account and don't want to mail BMT Micro, then put banknotes into an envelope! If you would send foreign currency like Dollar to my bank account, I would have to pay 15 DM (10$) changing fee! Do not send cheques in foreign currencies, either ! Eurocheques in Deutsche Mark are okay. If you can send Deutsche Mark (for example you live in Germany), my bank account Number is: Dresdner Bank Ottobrunn (Germany), Bank Code 700 800 00, Nr. 075 64 62 400. My postal address is: Dr. Martin Vieregg Hubertusstr. 26 D-85521 Ottobrunn Germany The E-Mail address is: 100661.626@compuserve.com ═══ 14.2. bugs and improvements ═══ What's new in pmCalc 3.0 A lot of minor improvements; system menu. First version available for Win95/NT. Some minor bugfixes in the new regression and programmers functionality. pmCalc 2.90, 2.0 and 1.0 were available for OS/2 only. What's new in pmCalc 2.9 Regression and new Programmers functionality. What's new in pmCalc 2.0 o several bugfixes o binary, octal, ASCII input and output o percent button o fraction output o last20 list, easy save and restore formulas o saving colors and window position o increased number of variable entryfields o more detailed docu, see graphics in trigonometric functions and important items o new buttons for "home" and "end" of the cursor in the main entry field, button for copying result into main entry field o several new program parameters o several minor improvements. Known bugs: The iconized window won't show the pmCalc-Icon. The output format - drop-down box and the precision entryfield does not remember colors. (Perhaps a bug in OS/2 Warp? I have no fixpacks.) Sometimes pmCalc corrupts the color file. (I haven't got any idea what's the reason.) Improvements and fixed bugs 2.0 to 2.9: o fixed bug: -min'sec forces an incorrect result o Saving X, Y, V, W values when pmCalc saves a formula. Improvements and fixed bugs 0.90 to 1.00: o tan() und atan() are OK now o numeric overflow has got better error handling o output result "normal (dot)" and "normal (comma)" o comments in brackets [ ] allowed o hypertext help. Of course, I can't test all possible formulas with pmCalc. It is possible that pmCalc calculates wrong results under certain circumstances. I would be very interested in knowing such bugs. Please write a letter if you find such a bug. ═══ 14.3. Disclaimer ═══ pmCalc is provided as is and comes with no warranty of any kind, either expressed or implied. In no event will the author be liable for any damages resulting from the use of this software. ═══ 14.4. Contacting the author ═══ Martin Vieregg, 32. I've studied economics. My main job is working in my own consulting company. Our special subject is public transport, especially railways. The title of my doctoral (PhD) thesis was "increasing efficiency of railway long-distance passenger traffic". My email address is: from Compuserve: 100661,626 from Internet: 100661.626@COMPUSERVE.COM My homepage is: http://ourworld.compuserve.com/homepages/vrb/VIEREGG.HTM Here you will get newest information about my programs, bug reports and beta versions. My postal address is: Dr. Martin Vieregg Hubertusstr. 26 D-85521 Ottobrunn Germany ═══ 14.5. Another pmCalc program ═══ Please notice that a second "PMCALC" exists. PMCALC.ZIP for OS/2 is an IBM employee written software, Tim Baldwin, U.K. * Tim Baldwin's PMCALC imitates a real pocket calculator. To distinguish in archives, this calculator is always shipped with the version number in the zip file name, Baldwin's is not. ═══ 14.6. other programs ═══ Here is the list of all other programs in English I've programmed. You will find them in the internet: visit my Homepage http://ourworld.compuserve.com/homepages/vrb/VIEREGG.HTM both Win95/NT and OS/2 HMAKEO35.ZIP (OS/2) HMAKEW35.ZIP (Win32) HyperMake 3.5. Creates HTML files, Winhelp and OS/2 Help from a more simple and intelligent ASCII format. Automatic linking, window arrangement, helptables, footnotes, tables and other features. Shareware if source file > 20 kB. See hypertext CD_SHORT.ZIP cd-short 1.5/2.0, instead of whole directory names you enter only substrings. Searching through several drives and opening OS/2 WPS folders. Freeware. only OS/2 TINYALRM.ZIP TinyAlarm 2.1, a simple countdown with a slider from 1 to 60, an alarm by entering alarm time and a chime. System shutdown. Freeware. ZIPSHELL.ZIP Simple Zipshell, a handful of tiny batchfiles for handling ZIP- and ARJ-files with the WPS. Freeware. CLEAR10E.ZIP Clear 1.0 Creating file lists for deleting and backup. Works together with Info-Zip. Freeware. ═══ 14.7. About this hypertext ═══ I have created this hypertext by using my HyperMake hypertext tool. It creates Winhelp, OS/2 help and HTML files from one simple and intelligent ASCII format. If a phrase is marked with an "index char", it is placed in the index and all other occurrences in the hypertext will get a link automatically. HyperMake also creates Helptables, and for line drawing, footnotes, window arrangement (and so on) there are short commands. The links at the end of some windows "subchapters... next chapter..." are created automatically. HyperMake is shareware for source files > 20 kB. Visit my homepage for more information about HyperMake. http://ourworld.compuserve.com/homepages/vrb/VIEREGG.HTM end of hypertext ═══ ═══ Open the settings notebook of the desktop, open the "menu"-page and drag your pmcalc program object into the second yellow text-window. Now you have a new menu item in your standard-context-menu like "shutdown": "pmCalc". ═══ ═══ It happened once to me. Sorry, but I haven't got any idea what's the reason. ═══ ═══ You'll find it in the system / productivity folder ═══ ═══ We had both shipped our pmCalc programs in March 95